import axios from "./http";

// 首页数据
export const getHomeList = (params) => {
  return axios.post("/ZCPT/rest/IAIPMobileApproval/homePage", params);
};

// 登录
export const loginPost = (params) => {
  return axios.post("/ZCPT/rest/IAIPMobileApproval/login", params);
};

// 获取业务模块
export const getBusinessModule = (params) => {
  return axios.get("/ZCPT/rest/IAIPMobileApproval/homeBizModel");
};

// 获取单据类型
export const getBillType = (params) => {
  return axios.get("/ZCPT/rest/IAIPMobileApproval/homeBizType/$" + params);
};

// 获取单据详情
export const getFormInfo = (params) => {
  let srt = params.guid + ":" + params.F_MDL;
  return axios.get("/ZCPT/rest/IAIPMobileApproval/formInfo/$" + srt);
};

// 退回
export const rollBack = (params) => {
  return axios.post("/ZCPT/rest/IAIPMobileApproval/rollBack", params);
};

// 提交
export const approveSubmit = (params) => {
  return axios.post("/ZCPT/rest/IAIPMobileApproval/submit", params);
};

// 获取退回节点
export const getReturnNode = (params) => {
  return axios.get("/ZCPT/rest/IAIPMobileApproval/rollBackNode/$" + params);
};

// 获取审批意见
export const getApprovalOpinions = (params) => {
  return axios.get("/ZCPT/rest/IAIPMobileApproval/approveOpinions/$" + params);
};

// 修改审批意见
export const editApprovalOpinions = (params) => {
  return axios.post("/ZCPT/rest/IAIPMobileApproval/updateApproveOpinions", params);
};